package org.simp.core.body.decoder;

import org.simp.core.body.SimpBody;
import org.simp.core.head.SimpHeader;
import org.simp.exception.SimpNotFoundException;
/**
 * SIMP 消息体解码器
 * @author Administrator
 *
 */
public interface SimpBodyDecoder {
	
	public void initDecoder();
	
	/**
	 * 根据消息头部解析消息体
	 * @param head
	 * @param bodyData
	 * @return
	 */
	public SimpBody decoder(SimpHeader head, byte [] bodyData) throws SimpNotFoundException ;
	
	/**
	 * 根据消息头部获取一个用于解析消息的simpBody
	 * @param head
	 * @return
	 */
	public SimpBody getSimpBodyByHead(SimpHeader head)  throws SimpNotFoundException ;

}
